namespace CIS
{
    using CISLib;
    using CISLib.EncryptClasses;
    using CISLib.Mail;
    using System;
    using System.Text;
    using System.Web.UI;
    using System.Web.UI.WebControls;

    public class test : Page
    {
        private ASCIIEncoding ascii = new ASCIIEncoding();
        protected Button Button1;
        protected Button Button2;
        protected Button Button3;
        protected Button Button4;
        private Encoding encoding = new UnicodeEncoding();
        protected Button sendBtn;
        protected TextBox TextBox1;
        protected TextBox TextBox2;

        private void Button1_Click(object sender, EventArgs e)
        {
            DESEncrypt mydes = new DESEncrypt();
            mydes.EncryptKey = this.TextBox1.Text.Trim();
        }

        private void Button2_Click(object sender, EventArgs e)
        {
            DESEncrypt mydes = new DESEncrypt();
            mydes.EncryptKey = this.TextBox1.Text.Trim();
        }

        private void Button3_Click(object sender, EventArgs e)
        {
            ManageCustomer.select("abcd");
        }

        private void Button4_Click(object sender, EventArgs e)
        {
            string test1 = "a abc王王哈沃。.！!，,#$%^&*()";
            string test2 = ManageOther.EncodeWithBytes(test1);
            string test3 = ManageOther.DecodeWithBytes(test2);
            string test4 = "。.！!";
            string test5 = ManageOther.EncodeWithBytes(test4);
            string test6 = ManageOther.DecodeWithBytes(test5);
            string[] test = new string[] { test2, test5 };
        }

        private void InitializeComponent()
        {
            this.sendBtn.Click += new EventHandler(this.sendBtn_Click);
            this.Button1.Click += new EventHandler(this.Button1_Click);
            this.Button2.Click += new EventHandler(this.Button2_Click);
            this.Button3.Click += new EventHandler(this.Button3_Click);
            this.Button4.Click += new EventHandler(this.Button4_Click);
            base.Load += new EventHandler(this.Page_Load);
        }

        protected override void OnInit(EventArgs e)
        {
            this.InitializeComponent();
            base.OnInit(e);
        }

        private void Page_Load(object sender, EventArgs e)
        {
        }

        private void sendBtn_Click(object sender, EventArgs e)
        {
            new SendMailEx().SendMail();
        }
    }
}

